package com.example.design.bilibili.singleton;

import javax.print.DocFlavor;

/**
 * 懒汉式-线程不安全
 */
public class SingletonTest3 {

    public static void main(String[] args) {

    }
}

class Singleton3{

    private static Singleton3 instance = null;

    private Singleton3(){

    }

    public static Singleton3 getInstance(){
        if(instance == null){
            instance = new Singleton3();
        }
        return instance;
    }

}